/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.handlers.commands;

import com.hercules.android.receiver.AndroidReceiver;
import com.hercules.android.receiver.model.commands.XRECommand;
import com.hercules.android.receiver.model.objects.XREView;

import java.util.List;

/**
 * This interface defines the contract to find views affected by command.
 * <p>
 * <b>Thread Safety:</b> Implementation should be thread safe or work in a thread safe manner.
 *
 * @author liuliquan, 7realm
 * @version 1.0
 */
public interface XREViewFinderUtility {
    /**
     * Get the affected view by the given command.
     *
     * @param command the XRECommand which affects the view
     * @param receiver the receiver for the XRE application
     * @return the list of affected views. May be empty if no view affected
     * @throws IllegalArgumentException if given command or receiver is null
     * @throws XREViewFinderUtilityException if any error occurs while finding the affected views
     */
    List<XREView> getAffectedViews(XRECommand command, AndroidReceiver receiver) throws XREViewFinderUtilityException;
}